package com.avicit.zipkinkafkaesserver.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 接口平均耗时统计
 */
@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ZIPKIN_INTERFACE_AVG_DURATION")
public class ZipkinInterfaceAverageDuration implements Serializable {
  @Id
  private String id;
  private String interfaceIp;
  private String interfacePath;
  private String interfaceMethods;
  private String serverName;
  private String serverPort;
  private Long interfaceAverageDuration;
//  private String queryKey;

  private String queryDate;

  @Temporal(TemporalType.TIMESTAMP)
  @CreationTimestamp
  private Date createTime;
  @Temporal(TemporalType.TIMESTAMP)
  @UpdateTimestamp
  private Date updateTime;


}
